package com.hwl.eduservice.controller;

import com.hwl.commonutils.result.RespBean;
import com.hwl.eduservice.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "首页")
@RestController
@RequestMapping("/api/eduIndex")
public class ApiIndexController {

    @Resource
    private TeacherService teacherService;

    @ApiOperation("课程和讲师的首页数据")
    @GetMapping
    public RespBean index() {
        return RespBean.ok().data(teacherService.selectHot());
    }
}
